package ch.sfug.events {
	import flash.events.Event;			

	public class StreamBufferEvent extends Event {

		public static const BUFFER_FULL:String = "buffer_full";
		public static const BUFFER_EMPTY:String = "buffer_empty";

		private var bL:Number;
		private var bT:Number;

		public function StreamBufferEvent( type:String, bufferLength:Number, bufferTime:Number, bubbles:Boolean = false, cancelable:Boolean = false ) {
			bL = bufferLength;
			bT = bufferTime;
        	
			super(type, bubbles, cancelable);
		}

		
		/**
		 * Creates and returns a copy of the current instance.
		 * @return a copy of the current instance.
		 */
		public override function clone():Event {
			return new StreamBufferEvent(type, bL, bT, bubbles, cancelable);
		}

		
		public function get bufferLength():Number {
			return bL;
		}

		
		public function get bufferTime():Number {
			return bT;
		}
		
		public override function toString() : String {
			return "StreamBufferEvent; length: " + bufferLength + " time: " + bufferTime;
		}
	}
}